package com.igeek.boot.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhiyu
 * @Date:14:47
 * @DESC:
 */
@RestController
@Slf4j
public class LogController {
    @GetMapping("/log")
    public String log(int id){
        try{
            int x = 10/id;
            log.debug("debug----id="+id);
            log.info("info----id="+id);
            log.warn("warn----id="+id);
        }catch (Exception e){
            e.printStackTrace();
            log.error("id为零了~~~");
        }
        return "ok";
    }
}
